const useCommonsStore = defineStore(
    // 唯一ID
    'common',
    {
        state: () => ({
            clientHeight: document.body.clientHeight,
            // 滚动距离
            scrollTop: 0,
            token: '',
            requestId: ''
        }),
        actions: {
            // 设置滚动距离
            setScrollTop(state) {
                this.scrollTop = state
            },
            setToken(state) {
                this.token = state
            },
            setRequestId(state) {
                this.requestId = state
            }
        }
    }
)

export default useCommonsStore
